1. Field of the Invention
The present invention relates to a motor-control device for an image-forming apparatus, and more particularly to a control device for a variable speed motor.
2. Discussion of Related Art
A motor-control device has been used, for example, for driving a paper feeding roller of a copying machine. The conventional device includes a motor, an encoder for outputting a pulse signal in response to rotation of the motor, a microcomputer for receiving the pulse signal outputted from the encoder and for outputting a driving signal, and a motor driving circuit for receiving the driving signal outputted from the microcomputer and for driving the motor based on the driving signal. An interrupt signal is inputted to the microcomputer at a rising edge P in each cycle of the encoder signal as shown in FIG. 5(a). When the interrupt signal is inputted, the microcomputer stops supplying a driving signal to the driving circuit. The microcomputer controls the actual rotational speed of the motor based on the encoder signal by controlling the value of the driving signal to make the motor rotate at a target-rotational speed by comparing the actual rotational speed with the target-rotational speed. More specifically, the microcomputer controls the time T.sub.OFF in which the outputting of the driving signal is to be suspended in order to control the rotational speed. The microcomputer requires an operation time T.sub.C for the operation of the driving-signal-stop time T.sub.OFF. After the operation is completed, when the driving-signal-stop time T.sub.OFF has passed from the rising edge P of the encoder signal, a driving signal is outputted to the motor-driving circuit.
In a conventional device, when it is intended to rotate a motor at a high speed, the time per cycle of the encoder signal is shortened with the increase of the motor speed. However, since the operation time T.sub.C of the computer is independent of the motor speed and is constant, if the driving-signal-stop time T.sub.OFF required becomes shorter than the operation time T.sub.C of the microcomputer as shown in FIG. 5(b), the time in which a driving signal can be outputted becomes shorter than the time in which the driving signal should be outputted. Because of this, there is a problem in a conventional device that the control of the rotational speed of the motor becomes impossible in a high speed operation of the motor.